package hibernate_basic.Persistence.comment_persitence;


import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Administrator
 * @create 2018-12-30 16:30
 * @desc 通过注解添加人员信息
 **/
@Entity//标识实体类
@Table(name="hibernate01")//指定保存此实体类对象值的数据表
public class Person {

    @Id//指定此实体类的唯一标识符(主键)
    private int id;

    private String name;

    private int age;

    private double height,weight;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }
}
